﻿using UnityEngine;
using UnityEditor;
using System;
using Sirenix.OdinInspector;
using System.Collections;
using System.Collections.Generic;

[SerializeField]
public class BulletShapeData: MyScriptableObject
{
    //############基础初始形状变化（状态机）
    //技能形状 -1.不相关 0 点 1，圆 2.OBB 3.poly 4.sector
    [ValueDropdown("SkillShapeEnum")]
    [LabelWidth(50)]
    [LabelText("形状")]
    public int shape;
    //圆 sector 半径
    [LabelWidth(50)]
    [LabelText("半径")]
    [HideIf("@this.shape != 1 && this.shape != 4")]
    public float raduis;
    //sector角度
    [LabelWidth(50)]
    [LabelText("角度")]
    [HideIf("@this.shape != 4")]
    public float angle;
    //OBB 宽度
    [LabelText("宽度")]
    [LabelWidth(50)]
    [HideIf("@this.shape != 2")]
    public float width;
    //OBB 长度
    [LabelText("长度")]
    [LabelWidth(50)]
    [HideIf("@this.shape != 2")]
    public float height;
    //poly的顶点（基于（0，0）点）
    [LabelText("顶点")]
    [LabelWidth(50)]
    [HideIf("@this.shape != 3")]
    public Vector2[] points;

#if UNITY_EDITOR
    private List<ValueDropdownItem<int>> SkillShapeEnum = new ValueDropdownList<int>()
    {
      { "不相关", -1 },
      { "点", 0 },
      { "圆", 1 },
      { "OBB", 2 },
      { "凸边型", 3 },
      { "扇", 4 },
    };
#endif
}